package cmd

import (
	"fmt"
	"os"

	"gitee.com/LangHuaHuachihua/blog-go/cmd/start"
	"github.com/spf13/cobra"
)

func Execute() {
	if err := rootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

var rootCmd = &cobra.Command{
	Use:   "blog-api",
	Short: "vlog后端",
	Long:  `个人博客`,
	Run: func(cmd *cobra.Command, args []string) {
		// Do Stuff Her	e
		//启动服务
		cmd.Help()
	},
}

func init() {
	rootCmd.AddCommand(start.Cmd)
}
